//
//  ExampleModel.swift
//  swift_review
//
//  Created by Andrew on 2024/11/26.
//

import UIKit

// 定义每层的结构体
struct Post: Codable {
    let id: Int
    let title: String
    let author: Author
    let comments: [Comment]
    let body: String
}

struct Author: Codable {
    let name: String
    let email: String
}

struct Comment: Codable {
    let id: Int
    let content: String
}

class ExampleModel: NSObject {

}

/**
 [
   {
     "id": 1,
     "title": "Post 1",
     "author": {
       "name": "Author 1",
       "email": "author1@example.com"
     },
     "comments": [
       {
         "id": 101,
         "content": "Great post!"
       },
       {
         "id": 102,
         "content": "Thanks for sharing!"
       }
     ]
   },
   {
     "id": 2,
     "title": "Post 2",
     "author": {
       "name": "Author 2",
       "email": "author2@example.com"
     },
     "comments": [
       {
         "id": 201,
         "content": "Very informative."
       }
     ]
   }
 ]
 */
